package com.shensi.api.admin.client.market;

import com.shensi.api.admin.client.fallback.monitor.SysLogininforClientFallBack;
import com.shensi.api.admin.domian.market.dto.ReductionOilRelationsDto;
import com.shensi.common.core.annotation.Log;
import com.shensi.common.core.constant.CloudConstant;
import com.shensi.common.core.domain.AjaxResult;
import com.shensi.common.core.enums.BusinessType;
import com.shensi.common.core.page.TableDataInfo;
import com.shensi.common.core.utils.poi.ExcelUtil;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;


/**
 * @author mao
 */
@FeignClient(
        value = CloudConstant.ADMIN_SERVER,
        fallbackFactory = SysLogininforClientFallBack.class)
@Component
public interface ReductionOilRelationsClient {


    /**
     * 查询立减活动和油品关系列表
     */
    @GetMapping("/market/reductionOilRelations/list")
    public TableDataInfo list(@SpringQueryMap ReductionOilRelationsDto reductionOilRelations);

    /**
     * 导出立减活动和油品关系列表
     */
    @GetMapping("/market/reductionOilRelations/export")
    public AjaxResult export(@SpringQueryMap ReductionOilRelationsDto reductionOilRelations);

    /**
     * 获取立减活动和油品关系详细信息
     */
    @GetMapping(value = "/market/reductionOilRelations/{activityOilId}")
    public AjaxResult getInfo(@PathVariable("activityOilId") Long activityOilId);

    /**
     * 新增立减活动和油品关系
     */
    @PostMapping("/market/reductionOilRelations")
    public AjaxResult add(@RequestBody ReductionOilRelationsDto reductionOilRelations);

    /**
     * 修改立减活动和油品关系
     */
    @PutMapping("/market/reductionOilRelations")
    public AjaxResult edit(@RequestBody ReductionOilRelationsDto reductionOilRelations);

    /**
     * 删除立减活动和油品关系
     */
    @DeleteMapping("/market/reductionOilRelations/{activityOilIds}")
    public AjaxResult remove(@PathVariable("activityOilIds") Long[] activityOilIds);

}
